package com.github.cloud.service;

import com.baomidou.mybatisplus.service.IService;
import com.github.cloud.common.util.R;
import com.github.cloud.model.dto.UserInfo;
import com.github.cloud.model.entity.SysUser;
import com.github.cloud.model.vo.UserVo;

/**
 * Created by guxiaowei on 2018/3/6.
 */
public interface SysUserService extends IService<SysUser>{

    /**
     * 根据用户名查询角色信息
     * @param username
     * @return
     */
    UserVo findUserByUsername(String username);

    /**
     * 查询用户信息
     *
     * @param userVo 角色名
     * @return userInfo
     */
    UserInfo findUserInfo(UserVo userVo);

    /**
     * 删除用户
     * @param sysUser 用户
     * @return boolean
     */
    Boolean deleteUserById(SysUser sysUser);

    /**
     * 保存验证码
     *  @param randomStr 随机串
     * @param imageCode 验证码*/
    void saveImageCode(String randomStr, String imageCode);

    /**
     * 发送验证码
     * @param mobile 手机号
     * @return R
     */
    R<Boolean> sendSmsCode(String mobile);




}
